package com.dk.controller;

import com.dk.pojo.Admin;
import com.dk.service.AdminService;
import com.dk.util.DBUtil;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author gcx
 * @date 2020/6/22
 */
@RestController
public class AdminController {

    private final AdminService adminService;

    public AdminController(AdminService adminService){
        this.adminService = adminService;
    }

    @RequestMapping("get")
    public List<Admin> get(){
        List<Admin> adminList = adminService.get();
        123456
        return adminList;
    }
    @RequestMapping("add")
    public String set(){
        adminService.set();
        return "ok";
    }
    
}
